package io.plus.utils.thread.lock_capable_task;

import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy;

@Slf4j
public class CallerRunsPolicyImpl extends CallerRunsPolicy {

    public CallerRunsPolicyImpl() {
    }

    public void rejectedExecution(Runnable runnable, ThreadPoolExecutor threadPoolExecutor) {
        log.error(runnable.getClass().getSimpleName());
        super.rejectedExecution(runnable, threadPoolExecutor);
    }

}
